Fixed problem where one route would get split into many smaller routes
authorparkrrrr <parkrrrr@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 2 Dec 2003 23:22:14 +0000 (23:22 +0000)
committerparkrrrr <parkrrrr@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 2 Dec 2003 23:22:14 +0000 (23:22 +0000)
gpsbabel/saroute.c

index 7d795e652c2d1c3df80c870b18f36ab22272445a..276967e8c3f26b72df6b1b298ac371f6521a6aa5 100644 (file)
@@ -183,9 +183,11 @@ my_read(void)
         * routing begins here 
         */
        count = ReadLong(infile);
-       while (count) {
+       if ( count ) {
                track_head = route_head_alloc();
                route_add_head(track_head);
+       }
+       while (count) {
                ReadShort(infile);
                recsize = ReadLong(infile);
                record = ReadRecord(infile, recsize);